//
//  LTView.m
//  UI03_UI
//
//  Created by LGC on 16/3/11.
//  Copyright © 2016年 Apon. All rights reserved.
//

#import "LTView.h"

@interface LTView ()



@end



@implementation LTView




- (void)dealloc {
    [_labelOfLeft release];
    [_textFieldOfRight release];
    [super dealloc];
}


#pragma mark - Creating and Init

- (instancetype)initWithFrame:(CGRect)frame {
    return [self initWithFrame:frame Text:nil placeHolder:nil];
}

- (instancetype)initWithFrame:(CGRect)frame Text:(NSString *)text placeHolder:(NSString *)placeHolder {
    self = [super initWithFrame:frame];
    
    if (self) {
       /** 子视图. label对象 */
        [self creatSubViewsWithFrame:frame Text:text placeHolder:placeHolder];
    }
    
    return self;
}

- (void)creatSubViewsWithFrame :(CGRect)frame Text:(NSString *)text placeHolder:(NSString *)placeHolder{
    
    self.labelOfLeft = [[UILabel alloc]initWithFrame:CGRectMake(0, 0, frame.size.width / 3, frame.size.height)];
    [self addSubview:self.labelOfLeft];
    [_labelOfLeft release];
    
    self.textFieldOfRight = [[UITextField alloc]initWithFrame:CGRectMake(frame.size.width / 3 + 10, 0, frame.size.width / 3 * 2, frame.size.height)];
    [self addSubview:self.textFieldOfRight];
    [_textFieldOfRight release];
    
    self.labelOfLeft.text = text;
    
   
    
    self.textFieldOfRight.placeholder = placeHolder;
    
    self.textFieldOfRight.borderStyle = 3;
    
    
    
    

}

@end
